Integrand size = 24, antiderivative size = 96 \[ \int \frac {3-x^2}{\sqrt {3+3 x^2-x^4}} \, dx=-\sqrt {\frac {1}{2} \left (-3+\sqrt {21}\right )} E\left (\arcsin \left (\sqrt {\frac {2}{3+\sqrt {21}}} x\right )|\frac {1}{2} \left (-5-\sqrt {21}\right )\right )+\sqrt {9+2 \sqrt {21}} \operatorname {EllipticF}\left (\arcsin \left (\sqrt {\frac {2}{3+\sqrt {21}}} x\right ),\frac {1}{2} \left (-5-\sqrt {21}\right )\right ) \]
-1/2*EllipticE(x*2^(1/2)/(3+21^(1/2))^(1/2),1/2*I*3^(1/2)+1/2*I*7^(1/2))*( -6+2*21^(1/2))^(1/2)+EllipticF(x*2^(1/2)/(3+21^(1/2))^(1/2),1/2*I*3^(1/2)+ 1/2*I*7^(1/2))*(9+2*21^(1/2))^(1/2)
Result contains complex when optimal does not.
Time = 10.14 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.07 \[ \int \frac {3-x^2}{\sqrt {3+3 x^2-x^4}} \, dx=-\frac {i \left (\left (3+\sqrt {21}\right ) E\left (i \text {arcsinh}\left (\sqrt {\frac {2}{-3+\sqrt {21}}} x\right )|\frac {1}{2} \left (-5+\sqrt {21}\right )\right )-\left (-3+\sqrt {21}\right ) \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {\frac {2}{-3+\sqrt {21}}} x\right ),\frac {1}{2} \left (-5+\sqrt {21}\right )\right )\right )}{\sqrt {2 \left (3+\sqrt {21}\right )}} \]
((-I)*((3 + Sqrt[21])*EllipticE[I*ArcSinh[Sqrt[2/(-3 + Sqrt[21])]*x], (-5 + Sqrt[21])/2] - (-3 + Sqrt[21])*EllipticF[I*ArcSinh[Sqrt[2/(-3 + Sqrt[21] )]*x], (-5 + Sqrt[21])/2]))/Sqrt[2*(3 + Sqrt[21])]
Time = 0.30 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.15, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {1494, 399, 321, 327}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {3-x^2}{\sqrt {-x^4+3 x^2+3}} \, dx\) |
\(\Big \downarrow \) 1494 |
\(\displaystyle 2 \int \frac {3-x^2}{\sqrt {-2 x^2+\sqrt {21}+3} \sqrt {2 x^2+\sqrt {21}-3}}dx\) |
\(\Big \downarrow \) 399 |
\(\displaystyle 2 \left (\frac {1}{2} \left (3+\sqrt {21}\right ) \int \frac {1}{\sqrt {-2 x^2+\sqrt {21}+3} \sqrt {2 x^2+\sqrt {21}-3}}dx-\frac {1}{2} \int \frac {\sqrt {2 x^2+\sqrt {21}-3}}{\sqrt {-2 x^2+\sqrt {21}+3}}dx\right )\) |
\(\Big \downarrow \) 321 |
\(\displaystyle 2 \left (\frac {\left (3+\sqrt {21}\right ) \operatorname {EllipticF}\left (\arcsin \left (\sqrt {\frac {2}{3+\sqrt {21}}} x\right ),\frac {1}{2} \left (-5-\sqrt {21}\right )\right )}{2 \sqrt {2 \left (\sqrt {21}-3\right )}}-\frac {1}{2} \int \frac {\sqrt {2 x^2+\sqrt {21}-3}}{\sqrt {-2 x^2+\sqrt {21}+3}}dx\right )\) |
\(\Big \downarrow \) 327 |
\(\displaystyle 2 \left (\frac {\left (3+\sqrt {21}\right ) \operatorname {EllipticF}\left (\arcsin \left (\sqrt {\frac {2}{3+\sqrt {21}}} x\right ),\frac {1}{2} \left (-5-\sqrt {21}\right )\right )}{2 \sqrt {2 \left (\sqrt {21}-3\right )}}-\frac {1}{2} \sqrt {\frac {1}{2} \left (\sqrt {21}-3\right )} E\left (\arcsin \left (\sqrt {\frac {2}{3+\sqrt {21}}} x\right )|\frac {1}{2} \left (-5-\sqrt {21}\right )\right )\right )\) |
2*(-1/2*(Sqrt[(-3 + Sqrt[21])/2]*EllipticE[ArcSin[Sqrt[2/(3 + Sqrt[21])]*x ], (-5 - Sqrt[21])/2]) + ((3 + Sqrt[21])*EllipticF[ArcSin[Sqrt[2/(3 + Sqrt [21])]*x], (-5 - Sqrt[21])/2])/(2*Sqrt[2*(-3 + Sqrt[21])]))
3.2.15.3.1 Defintions of rubi rules used
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> S imp[(1/(Sqrt[a]*Sqrt[c]*Rt[-d/c, 2]))*EllipticF[ArcSin[Rt[-d/c, 2]*x], b*(c /(a*d))], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0] && !(NegQ[b/a] && SimplerSqrtQ[-b/a, -d/c])
Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[ (Sqrt[a]/(Sqrt[c]*Rt[-d/c, 2]))*EllipticE[ArcSin[Rt[-d/c, 2]*x], b*(c/(a*d) )], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0]
Int[((e_) + (f_.)*(x_)^2)/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_) ^2]), x_Symbol] :> Simp[f/b Int[Sqrt[a + b*x^2]/Sqrt[c + d*x^2], x], x] + Simp[(b*e - a*f)/b Int[1/(Sqrt[a + b*x^2]*Sqrt[c + d*x^2]), x], x] /; Fr eeQ[{a, b, c, d, e, f}, x] && !((PosQ[b/a] && PosQ[d/c]) || (NegQ[b/a] && (PosQ[d/c] || (GtQ[a, 0] && ( !GtQ[c, 0] || SimplerSqrtQ[-b/a, -d/c])))))
Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4], x_Symbo l] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[2*Sqrt[-c] Int[(d + e*x^2)/(Sqr t[b + q + 2*c*x^2]*Sqrt[-b + q - 2*c*x^2]), x], x]] /; FreeQ[{a, b, c, d, e }, x] && GtQ[b^2 - 4*a*c, 0] && LtQ[c, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 203 vs. \(2 (74 ) = 148\).
Time = 2.09 (sec) , antiderivative size = 204, normalized size of antiderivative = 2.12
method | result | size |
default | \(\frac {18 \sqrt {1-\left (-\frac {1}{2}+\frac {\sqrt {21}}{6}\right ) x^{2}}\, \sqrt {1-\left (-\frac {1}{2}-\frac {\sqrt {21}}{6}\right ) x^{2}}\, F\left (\frac {x \sqrt {-18+6 \sqrt {21}}}{6}, \frac {i \sqrt {3}}{2}+\frac {i \sqrt {7}}{2}\right )}{\sqrt {-18+6 \sqrt {21}}\, \sqrt {-x^{4}+3 x^{2}+3}}+\frac {36 \sqrt {1-\left (-\frac {1}{2}+\frac {\sqrt {21}}{6}\right ) x^{2}}\, \sqrt {1-\left (-\frac {1}{2}-\frac {\sqrt {21}}{6}\right ) x^{2}}\, \left (F\left (\frac {x \sqrt {-18+6 \sqrt {21}}}{6}, \frac {i \sqrt {3}}{2}+\frac {i \sqrt {7}}{2}\right )-E\left (\frac {x \sqrt {-18+6 \sqrt {21}}}{6}, \frac {i \sqrt {3}}{2}+\frac {i \sqrt {7}}{2}\right )\right )}{\sqrt {-18+6 \sqrt {21}}\, \sqrt {-x^{4}+3 x^{2}+3}\, \left (3+\sqrt {21}\right )}\) | \(204\) |
elliptic | \(\frac {18 \sqrt {1-\left (-\frac {1}{2}+\frac {\sqrt {21}}{6}\right ) x^{2}}\, \sqrt {1-\left (-\frac {1}{2}-\frac {\sqrt {21}}{6}\right ) x^{2}}\, F\left (\frac {x \sqrt {-18+6 \sqrt {21}}}{6}, \frac {i \sqrt {3}}{2}+\frac {i \sqrt {7}}{2}\right )}{\sqrt {-18+6 \sqrt {21}}\, \sqrt {-x^{4}+3 x^{2}+3}}+\frac {36 \sqrt {1-\left (-\frac {1}{2}+\frac {\sqrt {21}}{6}\right ) x^{2}}\, \sqrt {1-\left (-\frac {1}{2}-\frac {\sqrt {21}}{6}\right ) x^{2}}\, \left (F\left (\frac {x \sqrt {-18+6 \sqrt {21}}}{6}, \frac {i \sqrt {3}}{2}+\frac {i \sqrt {7}}{2}\right )-E\left (\frac {x \sqrt {-18+6 \sqrt {21}}}{6}, \frac {i \sqrt {3}}{2}+\frac {i \sqrt {7}}{2}\right )\right )}{\sqrt {-18+6 \sqrt {21}}\, \sqrt {-x^{4}+3 x^{2}+3}\, \left (3+\sqrt {21}\right )}\) | \(204\) |
18/(-18+6*21^(1/2))^(1/2)*(1-(-1/2+1/6*21^(1/2))*x^2)^(1/2)*(1-(-1/2-1/6*2 1^(1/2))*x^2)^(1/2)/(-x^4+3*x^2+3)^(1/2)*EllipticF(1/6*x*(-18+6*21^(1/2))^ (1/2),1/2*I*3^(1/2)+1/2*I*7^(1/2))+36/(-18+6*21^(1/2))^(1/2)*(1-(-1/2+1/6* 21^(1/2))*x^2)^(1/2)*(1-(-1/2-1/6*21^(1/2))*x^2)^(1/2)/(-x^4+3*x^2+3)^(1/2 )/(3+21^(1/2))*(EllipticF(1/6*x*(-18+6*21^(1/2))^(1/2),1/2*I*3^(1/2)+1/2*I *7^(1/2))-EllipticE(1/6*x*(-18+6*21^(1/2))^(1/2),1/2*I*3^(1/2)+1/2*I*7^(1/ 2)))
Time = 0.10 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.11 \[ \int \frac {3-x^2}{\sqrt {3+3 x^2-x^4}} \, dx=\frac {-6 i \, \sqrt {2} x \sqrt {\sqrt {21} + 3} F(\arcsin \left (\frac {\sqrt {2} \sqrt {\sqrt {21} + 3}}{2 \, x}\right )\,|\,\frac {1}{2} \, \sqrt {21} - \frac {5}{2}) + {\left (i \, \sqrt {21} \sqrt {2} x + 3 i \, \sqrt {2} x\right )} \sqrt {\sqrt {21} + 3} E(\arcsin \left (\frac {\sqrt {2} \sqrt {\sqrt {21} + 3}}{2 \, x}\right )\,|\,\frac {1}{2} \, \sqrt {21} - \frac {5}{2}) + 4 \, \sqrt {-x^{4} + 3 \, x^{2} + 3}}{4 \, x} \]
1/4*(-6*I*sqrt(2)*x*sqrt(sqrt(21) + 3)*elliptic_f(arcsin(1/2*sqrt(2)*sqrt( sqrt(21) + 3)/x), 1/2*sqrt(21) - 5/2) + (I*sqrt(21)*sqrt(2)*x + 3*I*sqrt(2 )*x)*sqrt(sqrt(21) + 3)*elliptic_e(arcsin(1/2*sqrt(2)*sqrt(sqrt(21) + 3)/x ), 1/2*sqrt(21) - 5/2) + 4*sqrt(-x^4 + 3*x^2 + 3))/x
\[ \int \frac {3-x^2}{\sqrt {3+3 x^2-x^4}} \, dx=- \int \frac {x^{2}}{\sqrt {- x^{4} + 3 x^{2} + 3}}\, dx - \int \left (- \frac {3}{\sqrt {- x^{4} + 3 x^{2} + 3}}\right )\, dx \]
\[ \int \frac {3-x^2}{\sqrt {3+3 x^2-x^4}} \, dx=\int { -\frac {x^{2} - 3}{\sqrt {-x^{4} + 3 \, x^{2} + 3}} \,d x } \]
\[ \int \frac {3-x^2}{\sqrt {3+3 x^2-x^4}} \, dx=\int { -\frac {x^{2} - 3}{\sqrt {-x^{4} + 3 \, x^{2} + 3}} \,d x } \]
Timed out. \[ \int \frac {3-x^2}{\sqrt {3+3 x^2-x^4}} \, dx=\int -\frac {x^2-3}{\sqrt {-x^4+3\,x^2+3}} \,d x \]